package com.sy.core.interceptor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Arrays;
import java.util.List;

@Configuration
public class LoginInteceptorConfig implements WebMvcConfigurer {

    /**
     * 定义放行路径
     */
//    public static List<String> EXCLUDE_PATH =
//            Arrays.asList("/login/login_in","/swagger-ui.html","/**/css/**","/webjars/springfox-swagger-ui/**","/swagger-resources",
//                    "/configuration/**","/error");
//    @Bean
//    public LoginInterceptor getLoginInterceptor() {
//        return new LoginInterceptor();
//    }
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(getLoginInterceptor()).addPathPatterns("/**").excludePathPatterns(EXCLUDE_PATH);
//    }


}
